package com.ffyc.resale.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ffyc.resale.model.ForumComment;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.util.List;

// 帖子评论dao层
public interface ForumCommentDao extends BaseMapper<ForumComment> {


    List<ForumComment> selectTree(Integer fid);

    @Select("select count(*) from comment where fid = #{fid}")
    Integer selectCount(@Param("fid") Integer fid);

    @Select("select * from comment where pid = #{pid}")
    List<ForumComment> selectByPid(Integer pid);
}
